﻿@using HouseHoldBudget.Core.Settings
@*
* Helpers
*@

@helper Style(string style)
{
    if (ApplicationSettings.IsDebugMode)
    {
        <link href="@String.Format("{0}?{1}", style, Guid.NewGuid().ToString("N"))" rel="stylesheet" type="text/css" />
    }
    else
    {
        <link href="@style" rel="stylesheet" type="text/css" />
    }
}

@helper Script(string script)
{
    if (ApplicationSettings.IsDebugMode)
    {
        <script src="@String.Format("{0}?{1}", script, Guid.NewGuid().ToString("N"))" type="text/javascript"> </script>
    }
    else
    {
        <script src="@script" type="text/javascript"> </script>
    }
}

@helper Image(string imageUri, string title)
{
    <img src="@imageUri" alt="@title" title="@title" />
}

@helper RequiredStar()
{
    <span class="required-star">*</span>
}